package org.caro.gui;

import javax.swing.JTextArea;

public class ChatZoneArea extends JTextArea {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String homePlayer,awayPlayer;
	public ChatZoneArea(String homePlayer,String awayPlayer) {
		super();
		this.homePlayer = homePlayer;
		this.awayPlayer = awayPlayer;
		super.setEditable(false);
	}
	public ChatZoneArea(){
		this("player 1", "player 2");
	}
	public ChatZoneArea(String human){
		this("","");
	}
	public void chatByHome(String message){
		super.append(homePlayer+" : "+message +"\n");
	}
	public void chatByAway(String message){
		super.append(awayPlayer+" : "+message +"\n");
	}
	public void clearChat(){
		super.setText("");
	}

}
